<template>
	<view>
		
		<video id="video" :src="playurl" controls></video>
			
		<view class="video">
			<u--text text="播放地址:"></u--text>
			<u--input
			    placeholder="播放地址"
			    border="surround"
			    v-model="playurl"
			  ></u--input>
			  
			<!--  <u-button type="primary" text="拉流" @click="play()"></u-button> -->
		</view>
		
		<u-tabbar
			:value="currentTab"
			@change="changeTab"
			:fixed="true"
			:placeholder="true"
			:safeAreaInsetBottom="true"
		>
			<u-tabbar-item text="首页" icon="home"  ></u-tabbar-item>
			<u-tabbar-item text="播放" icon="play-right" ></u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				currentTab:'',
				playurl:''
			}
		},
		methods: {
			play(e){
				this.url = this.playurl
			},
			changeTab(e){
				console.log(e)
				if(e==1){
				}else{
					uni.reLaunch({
						url:'/pages/index/index'
					})
				}
			}
		}
	}
</script>

<style>
.video {
	width: 95%;
	margin: 10rpx auto;
}
.u-text {
	padding-bottom: 30rpx;
}
.u-button {
	margin-top: 20rpx;
}
video {
	width: 100%;
	height: 500rpx;
}
</style>
